From: Florian Müllner Date: Sun, 20 Mar 2022 14:22:31 +0000 (+0100) Subject: st/theme-node: Default to right text-align in RTL X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~480^2^2~55 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=35120dd69cde1411e3faa44e4136a2bf7aebc3cd;p=gnome-shell.git st/theme-node: Default to right text-align in RTL When neither the theme node itself nor any of its parents specifies an explicit text direction, we default to aligning to the left. That's a good default for LTR locales, but for RTL aligning to the right is a better one. Part-of: --- diff --git a/src/st/st-theme-node.c b/src/st/st-theme-node.c index e6fb80b11..13dbca88f 100644 --- a/src/st/st-theme-node.c +++ b/src/st/st-theme-node.c @@ -2649,6 +2649,9 @@ st_theme_node_get_text_align(StThemeNode *node) } if(node->parent_node) return st_theme_node_get_text_align(node->parent_node); + + if (clutter_get_default_text_direction () == CLUTTER_TEXT_DIRECTION_RTL) + return ST_TEXT_ALIGN_RIGHT; return ST_TEXT_ALIGN_LEFT; }